# coding: utf-8

from enum import Enum

class Mark(Enum):
    D = "底分型"
    G = "顶分型"

class Direction(Enum):
    Up = "向上"
    Down = "向下"

class Freq(Enum):
    F1 = "1分钟"
    F5 = "5分钟"
    F15 = "15分钟"
    F30 = "30分钟"
    F60 = "60分钟"
    D = "日线"
    W = "周线"
    M = "月线"

class Signals(Enum):
    Other = "Other~其他"
    Y = "Y~是"
    N = "N~否"

    INB = "INB~向下笔买点区间"
    INS = "INS~向上笔卖点区间"

    FXB = "FXB~向下笔结束分型左侧高点升破"
    FXS = "FXS~向上笔结束分型左侧低点跌破"

    BU0 = "BU0~向上笔顶分完成"
    BU1 = "BU1~向上笔走势延伸"

    BD0 = "BD0~向下笔底分完成"
    BD1 = "BD1~向下笔走势延伸"

    # TK = Triple K
    TK1 = "TK1~三K底分"
    TK2 = "TK2~三K上涨"
    TK3 = "TK3~三K顶分"
    TK4 = "TK4~三K下跌"

    # ==================================================================================================================
    # 信号值编码规则：
    # 多空：L - 多头信号；S - 空头信号；
    # 编号：A0 - A类基础型；A1 - A类变种1 ... 以此类推；基础型有着特殊含义，用于因子组合，各种变种形态编号主要用于形态对比研究。
    # 组合规则：笔数_多空_编号；如 LA0 表示多头信号A0
    # ==================================================================================================================
    LA0 = "LA0~底背驰"
    LB0 = "LB0~双重底背驰"
    LG0 = "LG0~上颈线突破"
    LH0 = "LH0~向上中枢完成"
    LI0 = "LI0~三买"
    LJ0 = "LJ0~向上三角扩张中枢"
    LK0 = "LK0~向上三角收敛中枢"
    LL0 = "LL0~向上平台型中枢"
    # ------------------------------------------------------------------------------------------------------------------

    LA1 = "LA1~底背驰特例一"
    LA2 = "LA2~底背驰特例二"
    LA3 = "LA3~底背驰特例三"

    LB1 = "LB1~双重底背驰特例一"
    LB2 = "LB2~双重底背驰特例二"
    LB3 = "LB3~双重底背驰特例三"

    LG1 = "LG1~上颈线突破特例一"
    LG2 = "LG2~上颈线突破特例二"
    LG3 = "LG3~上颈线突破特例三"

    LH1 = "LH1~向上中枢完成特例一"
    LH2 = "LH2~向上中枢完成特例二"
    LH3 = "LH3~向上中枢完成特例三"

    LI1 = "LI1~三买特例一"
    LI2 = "LI2~三买特例二"
    LI3 = "LI3~三买特例三"

    LJ1 = "LJ1~向上三角扩张中枢特例一"
    LJ2 = "LJ2~向上三角扩张中枢特例二"
    LJ3 = "LJ3~向上三角扩张中枢特例三"

    LK1 = "LK1~向上三角收敛中枢特例一"
    LK2 = "LK2~向上三角收敛中枢特例二"
    LK3 = "LK3~向上三角收敛中枢特例三"

    LL1 = "LL1~向上平台型中枢特例一"
    LL2 = "LL2~向上平台型中枢特例二"
    LL3 = "LL3~向上平台型中枢特例三"

    # ------------------------------------------------------------------------------------------------------------------
    SA0 = "SA0~顶背驰"
    SB0 = "SB0~双重顶背驰"
    SG0 = "SG0~下颈线突破"
    SH0 = "SH0~向下中枢完成"
    SI0 = "SI0~三卖"
    SJ0 = "SJ0~向下三角扩张中枢"
    SK0 = "SK0~向下三角收敛中枢"
    SL0 = "SL0~向下平台型中枢"
    # ------------------------------------------------------------------------------------------------------------------
    SA1 = "SA1~顶背驰特例一"
    SA2 = "SA2~顶背驰特例二"
    SA3 = "SA3~顶背驰特例三"

    SB1 = "SB1~双重顶背驰特例一"
    SB2 = "SB2~双重顶背驰特例二"
    SB3 = "SB3~双重顶背驰特例三"

    SG1 = "SG1~下颈线突破特例一"
    SG2 = "SG2~下颈线突破特例二"
    SG3 = "SG3~下颈线突破特例三"

    SH1 = "SH1~向下中枢完成特例一"
    SH2 = "SH2~向下中枢完成特例二"
    SH3 = "SH3~向下中枢完成特例三"

    SI1 = "SI1~三卖特例一"
    SI2 = "SI2~三卖特例二"
    SI3 = "SI3~三卖特例三"

    SJ1 = "SJ1~向下三角扩张中枢特例一"
    SJ2 = "SJ2~向下三角扩张中枢特例二"
    SJ3 = "SJ3~向下三角扩张中枢特例三"

    SK1 = "SK1~向下三角收敛中枢特例一"
    SK2 = "SK2~向下三角收敛中枢特例二"
    SK3 = "SK3~向下三角收敛中枢特例三"

    SL1 = "SL1~向下平台型中枢特例一"
    SL2 = "SL2~向下平台型中枢特例二"
    SL3 = "SL3~向下平台型中枢特例三"

    # --------------------------------------------------------------------------------------------
    # 信号值编码规则：
    # 笔数：X3 - 三笔信号；
    # 多空：L - 多头信号；S - 空头信号；
    # 编号：A0 - A类基础型；A1 - A类变种1 ... 以此类推
    # 组合规则：笔数_多空_编号；如 X3LA0 表示三笔多头信号A0
    # ============================================================================================
    # 三笔形态信号
    # --------------------------------------------------------------------------------------------
    X3LA0 = "X3LA0~向下不重合"
    X3LB0 = "X3LB0~向下奔走型中枢"
    X3LC0 = "X3LC0~向下三角收敛中枢"
    X3LD0 = "X3LD0~向下三角扩张中枢"
    X3LE0 = "X3LE0~向下盘背中枢"
    X3LF0 = "X3LF0~向下无背中枢"

    X3SA0 = "X3SA0~向上不重合"
    X3SB0 = "X3SB0~向上奔走型中枢"
    X3SC0 = "X3SC0~向上三角收敛中枢"
    X3SD0 = "X3SD0~向上三角扩张中枢"
    X3SE0 = "X3SE0~向上盘背中枢"
    X3SF0 = "X3SF0~向上无背中枢"


class Factors(Enum):
    Other = "Other~其他"
    Y = "Y~是"
    N = "N~否"
    # ==================================================================================================================
    # 因子值编码规则：
    # 类型：
    #   L1 - 一买/类一买；L2 - 二买/类二买；L3 - 三买/类三买；
    #   S1 - 一卖/类一卖；S2 - 二卖/类二卖；S3 - 三卖/类三卖；
    # 编号：A0 - A类基础型；A1 - A类变种1 ... 以此类推
    # 组合规则为 类型_编号
    # ==================================================================================================================
    L1A0 = "L1A0~一买"
    L1A1 = "L1A1~一买特例一"
    L1A2 = "L1A2~一买特例二"
    L1A3 = "L1A3~一买特例三"
    L1A4 = "L1A4~一买特例四"
    L1A5 = "L1A5~一买特例五"

    L2A0 = "L2A0~二买"
    L2A1 = "L2A1~二买特例一"
    L2A2 = "L2A2~二买特例二"
    L2A3 = "L2A3~二买特例三"
    L2A4 = "L2A4~二买特例四"
    L2A5 = "L2A5~二买特例五"

    L3A0 = "L3A0~三买"
    L3A1 = "L3A1~三买特例一"
    L3A2 = "L3A2~三买特例二"
    L3A3 = "L3A3~三买特例三"
    L3A4 = "L3A4~三买特例四"
    L3A5 = "L3A5~三买特例五"
    # ------------------------------------------------------------------------------------------------------------------
    S1A0 = "S1A0~一卖"
    S1A1 = "S1A1~一卖特例一"
    S1A2 = "S1A2~一卖特例二"
    S1A3 = "S1A3~一卖特例三"
    S1A4 = "S1A4~一卖特例四"
    S1A5 = "S1A5~一卖特例五"

    S2A0 = "S2A0~二卖"
    S2A1 = "S2A1~二卖特例一"
    S2A2 = "S2A2~二卖特例二"
    S2A3 = "S2A3~二卖特例三"
    S2A4 = "S2A4~二卖特例四"
    S2A5 = "S2A5~二卖特例五"

    S3A0 = "S3A0~三卖"
    S3A1 = "S3A1~三卖特例一"
    S3A2 = "S3A2~三卖特例二"
    S3A3 = "S3A3~三卖特例三"
    S3A4 = "S3A4~三卖特例四"
    S3A5 = "S3A5~三卖特例五"
    # ==================================================================================================================
